<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>扩展运算符</title>
</head>

<body>
    <script>
        // let arr = [10, 20, 30];
        // let newArr = [...arr]

        // arr.push(40);
        // console.log(newArr);

        // const obj = { name: "张三", age: 20 };
        // const newObj = { ...obj };

        // obj.age = 30;
        // console.log(newObj);

        // let arr1 = [10, 20];
        // let arr2 = [30, 40];

        // let newArr = [...arr1, ...arr2];


        // let obj1 = { x: 1 };
        // let obj2 = { y: 2 };
        // let newObj = { ...obj1, ...obj2 }


        let arr = [10, 1, 8, 100, 9, 2, 12, 15];
        // ...arr
        const max = Math.max(...arr);
        console.log(max);



    </script>
</body>

</html>